<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/angular.min.js"></script>
<script>
    //定义模板
    var app = angular.module('demo',[]);
    //控制层
    app.controller('democontroller',function ($scope,$http) {
        //查询中软
        $scope.queryZhongRuan = function () {
           // alert("111")
            $scope.zr = [];
            ///demo/query/zr----zr代表中软
            $http.get("/demo/query/zr").success(function (response) {
                $scope.zr=response;
            })
        }

        //查询软通
        $scope.queryRuan= function () {
            $scope.ruantong = [];
            ///demo/query/rt----rt代表软通
            $http.get("/demo/query/rt").success(function (response) {
                $scope.ruantong=response;
            })
        }
    })
</script>
<body ng-app="demo" ng-controller="democontroller">
    <div id="zhong ruan" align="center" ng-click="queryZhongRuan()">
        <button type="button" name="tabs" value="tabs"/>中软
    </div>
    <div align="center">
        <table border="1px">
            <tr  ng-repeat="item in zr" >
                <td>id</td>
                <td>{{item.orgId}}</td>
            </tr>
            <tr  ng-repeat="item in zr">
                <td>名称</td>
                <td>{{item.orgName}}</td>
            </tr>
        </table>
    </div>

    <div align="center">
        <button id="ruantong" type="button" name="tabs" value="tabs" ng-click="queryRuan()"/>软通
    </div>
    <div align="center">
        <table border="1px">
            <tr ng-repeat="item in ruantong">
                <td>id</td>
                <td>{{item.orgId}}</td>
            </tr>
            <tr  ng-repeat="item in ruantong">
                <td>名称</td>
                <td>{{item.orgName}}</td>
            </tr>
        </table>
    </div>

</body>
</html>